package com.openbravo.ws.externalsales;

import java.io.Serializable;
import java.lang.reflect.Array;
import java.util.Arrays;
import javax.xml.namespace.QName;
import org.apache.axis.description.ElementDesc;
import org.apache.axis.description.TypeDesc;
import org.apache.axis.encoding.Deserializer;
import org.apache.axis.encoding.Serializer;
import org.apache.axis.encoding.ser.BeanDeserializer;
import org.apache.axis.encoding.ser.BeanSerializer;

public class Order
  implements Serializable
{
  private static final long serialVersionUID = 9384737214755L;
  private BPartner businessPartner;
  private OrderLine[] lines;
  private OrderIdentifier orderId;
  private Payment[] payment;
  private int state;
  private Object __equalsCalc = null;
  private boolean __hashCodeCalc = false;
  private static TypeDesc typeDesc = new TypeDesc(Order.class, true);

  public Order()
  {
  }

  public Order(BPartner paramBPartner, OrderLine[] paramArrayOfOrderLine, OrderIdentifier paramOrderIdentifier, Payment[] paramArrayOfPayment, int paramInt)
  {
    this.businessPartner = paramBPartner;
    this.lines = paramArrayOfOrderLine;
    this.orderId = paramOrderIdentifier;
    this.payment = paramArrayOfPayment;
    this.state = paramInt;
  }

  public BPartner getBusinessPartner()
  {
    return this.businessPartner;
  }

  public void setBusinessPartner(BPartner paramBPartner)
  {
    this.businessPartner = paramBPartner;
  }

  public OrderLine[] getLines()
  {
    return this.lines;
  }

  public void setLines(OrderLine[] paramArrayOfOrderLine)
  {
    this.lines = paramArrayOfOrderLine;
  }

  public OrderIdentifier getOrderId()
  {
    return this.orderId;
  }

  public void setOrderId(OrderIdentifier paramOrderIdentifier)
  {
    this.orderId = paramOrderIdentifier;
  }

  public Payment[] getPayment()
  {
    return this.payment;
  }

  public void setPayment(Payment[] paramArrayOfPayment)
  {
    this.payment = paramArrayOfPayment;
  }

  public int getState()
  {
    return this.state;
  }

  public void setState(int paramInt)
  {
    this.state = paramInt;
  }

  public synchronized boolean equals(Object paramObject)
  {
    if (!(paramObject instanceof Order))
      return false;
    Order localOrder = (Order)paramObject;
    if (paramObject == null)
      return false;
    if (this == paramObject)
      return true;
    if (this.__equalsCalc != null)
      return this.__equalsCalc == paramObject;
    this.__equalsCalc = paramObject;
    int i = ((this.businessPartner == null) && (localOrder.getBusinessPartner() == null)) || ((this.businessPartner != null) && (this.businessPartner.equals(localOrder.getBusinessPartner())) && (((this.lines == null) && (localOrder.getLines() == null)) || ((this.lines != null) && (Arrays.equals(this.lines, localOrder.getLines())) && (((this.orderId == null) && (localOrder.getOrderId() == null)) || ((this.orderId != null) && (this.orderId.equals(localOrder.getOrderId())) && (((this.payment == null) && (localOrder.getPayment() == null)) || ((this.payment != null) && (Arrays.equals(this.payment, localOrder.getPayment())) && (this.state == localOrder.getState())))))))) ? 1 : 0;
    this.__equalsCalc = null;
    return i==1;
  }

  public synchronized int hashCode()
  {
    if (this.__hashCodeCalc)
      return 0;
    this.__hashCodeCalc = true;
    int i = 1;
    if (getBusinessPartner() != null)
      i += getBusinessPartner().hashCode();
    int j;
    Object localObject;
    if (getLines() != null)
      for (j = 0; j < Array.getLength(getLines()); j++)
      {
        localObject = Array.get(getLines(), j);
        if ((localObject == null) || (localObject.getClass().isArray()))
          continue;
        i += localObject.hashCode();
      }
    if (getOrderId() != null)
      i += getOrderId().hashCode();
    if (getPayment() != null)
      for (j = 0; j < Array.getLength(getPayment()); j++)
      {
        localObject = Array.get(getPayment(), j);
        if ((localObject == null) || (localObject.getClass().isArray()))
          continue;
        i += localObject.hashCode();
      }
    i += getState();
    this.__hashCodeCalc = false;
    return i;
  }

  public static TypeDesc getTypeDesc()
  {
    return typeDesc;
  }

  public static Serializer getSerializer(String paramString, Class paramClass, QName paramQName)
  {
    return new BeanSerializer(paramClass, paramQName, typeDesc);
  }

  public static Deserializer getDeserializer(String paramString, Class paramClass, QName paramQName)
  {
    return new BeanDeserializer(paramClass, paramQName, typeDesc);
  }

  static
  {
    typeDesc.setXmlType(new QName("/services/ExternalSales", "Order"));
    ElementDesc localElementDesc = new ElementDesc();
    localElementDesc.setFieldName("businessPartner");
    localElementDesc.setXmlName(new QName("", "businessPartner"));
    localElementDesc.setXmlType(new QName("/services/ExternalSales", "BPartner"));
    localElementDesc.setNillable(true);
    typeDesc.addFieldDesc(localElementDesc);
    localElementDesc = new ElementDesc();
    localElementDesc.setFieldName("lines");
    localElementDesc.setXmlName(new QName("", "lines"));
    localElementDesc.setXmlType(new QName("/services/ExternalSales", "OrderLine"));
    localElementDesc.setNillable(true);
    typeDesc.addFieldDesc(localElementDesc);
    localElementDesc = new ElementDesc();
    localElementDesc.setFieldName("orderId");
    localElementDesc.setXmlName(new QName("", "orderId"));
    localElementDesc.setXmlType(new QName("/services/ExternalSales", "OrderIdentifier"));
    localElementDesc.setNillable(true);
    typeDesc.addFieldDesc(localElementDesc);
    localElementDesc = new ElementDesc();
    localElementDesc.setFieldName("payment");
    localElementDesc.setXmlName(new QName("", "payment"));
    localElementDesc.setXmlType(new QName("/services/ExternalSales", "Payment"));
    localElementDesc.setNillable(true);
    typeDesc.addFieldDesc(localElementDesc);
    localElementDesc = new ElementDesc();
    localElementDesc.setFieldName("state");
    localElementDesc.setXmlName(new QName("", "state"));
    localElementDesc.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
    localElementDesc.setNillable(false);
    typeDesc.addFieldDesc(localElementDesc);
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.ws.externalsales.Order
 * JD-Core Version:    0.6.0
 */